package com.woniu.service.impl;

import com.woniu.adapter.CustomerTypeAdapter;
import com.woniu.outlet.po.CustomerTypePo;
import com.woniu.service.CustomerTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class CustomerTypeServiceImpl implements CustomerTypeService {

    @Autowired
    private CustomerTypeAdapter customerTypeAdapter;

    @Override
    public List<CustomerTypePo> findCustomerTypes() throws Exception {
        List<CustomerTypePo> customerTypePos = customerTypeAdapter.findCustomerTypes();
        return customerTypePos;
    }

    @Override
    public CustomerTypePo getCustomerTypeById(Long id) throws Exception {
        return customerTypeAdapter.getCustomerTypeById(id);
    }
}
